<template>
  <div id="backstage">
    <h1>后台页面挂载点</h1>
    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
      <el-tab-pane label="用户管理" name="first">
        <el-tag type="success">标签二</el-tag>
      </el-tab-pane>
      <el-tab-pane label="配置管理" name="second">配置管理</el-tab-pane>
      <el-tab-pane label="角色管理" name="third">角色管理</el-tab-pane>
      <el-tab-pane label="定时任务补偿" name="fourth">定时任务补偿</el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
// import { mapActions } from 'vuex'
import { createNamespacedHelpers } from 'vuex'
const { mapActions } = createNamespacedHelpers('expendType') //自动解析局部命名空间
export default {
  name: 'Backstage',
  data() {
    return {
      activeName: 'first'
    };
  },
  methods: {
    ...mapActions(['someAction']),
    handleClick(tab, event) {
      console.log(tab, event);
    }

  },
  created() {
    console.log(this.$store.state.ygrStore.expendType.datas)
    console.log(this.$store.commit('expend/test'))
    console.log(this.$store.commit('expendType/test'))
    console.log(this.$store.dispatch('expendType/someAction'))
    this.someAction()
  }
}

</script>
<style scoped>
</style>
